package 笔试.美团;

import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class 选数比输赢 {
    public static int n;
    public static int q;
    public static int[] nums;
    // 6 1
    //1 1 4 5 1 4
    //3 3

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        q = in.nextInt();
        nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] = in.nextInt();
        }
        for (int i = 0; i < q; i++) {
            int l = in.nextInt();
            int r = in.nextInt();
            solve(l - 1, r - 1);
        }
    }

    // 5 1
    // 1 2 1 2 3
    //  2 5
    private static void solve(int l, int r) {
        int maxA = 0;
        int maxi = 0;
        for (int i = l; i <= r; i++) {
            if (nums[i] > maxA) {
                maxA = nums[i];
                maxi = i;
            }
        }
        int left = l;
        int right = r;
        int difl = -999;
        int difr = 999;
        int maxB = 0;
        while (left >= 0 && right < n) {
            if (nums[left] > maxA) {
                System.out.println("win");
                System.out.println(r - left + 1);
                return;
            }
            if (nums[right] > maxA) {
                System.out.println("win");
                System.out.println(right - l + 1);
                return;
            }
            if (nums[left] == maxA && left != maxi) {
                maxB = maxA;
                difl = left;
            }
            if (nums[right] == maxA && right != maxi) {
                maxB = maxA;
                difr = right;
            }
            left--;
            right++;
        }
        while (left >= 0) {
            if (nums[left] > maxA) {
                System.out.println("win");
                System.out.println(r - left + 1);
                return;
            }
            if (nums[left] == maxA && left != maxi) {
                maxB = maxA;
                difl = left;
            }
            left--;
        }
        while (right < n) {
            if (nums[right] > maxA) {
                System.out.println("win");
                System.out.println(right - l + 1);
                return;
            }
            if (nums[right] == maxA && right != maxi) {
                maxB = maxA;
                difr = right;
            }
            right++;
        }
        if (maxA == maxB) {
            System.out.println("draw");
            int dif = Math.min(r - difl + 1, difr - l + 1);
            System.out.println(dif);
        } else {
            System.out.println("lose");
            int dif = 2;
            if (difl != -999 && difr != 999) {
                dif = Math.min(r - difl + 1, difr - l + 1);
            } else if (difr != 999) {
                dif = difr - l + 1;
            } else if (difl != -999) {
                dif = r - difl + 1;
            }
            System.out.println(dif);
        }
    }
}